package at.kokoni.Koko_Ni.entities;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;

public class Post implements ApiData {
	private int id;
	@SerializedName("stamp")
	private String timestamp;
	private double latitude;
	private double longitude;
	private String text;
	@SerializedName("userid")
	private int userId;
	@SerializedName("name")
	private String userName;
	private int[] images;

	public Post() {
	}

	public Post(String text, double latitude, double longitude) {
		this.text = text;
		this.latitude = latitude;
		this.longitude = longitude;
	}

	public static Post postFromJson(String json) {
		Gson gson = new Gson();
		return gson.fromJson(json, Post.class);
	}

	public int getId() {
		return id;
	}

	public String getTimestamp() {
		return timestamp;
	}

	public double getLatitude() {
		return latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public String getText() {
		return text;
	}

	public int getUserId() {
		return userId;
	}

	public String getUserName() {
		return userName;
	}

	public int[] getImages() {
		return images;
	}

	public void setId(int id) {
		this.id = id;
	}
}
